home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / PLANE.PI < prev    next >
Encoding:
Text File  |  1992-04-05  |  3.0 KB  |  103 lines

  1. // Simple aircraft - The animation rolls it about one axis, then another.
  2. //
  3. // If scan conversion is used, there is a noticable problem with shading
  4. // due to the distinction between the top and bottom of polygons.
  5. //
  6.  
  7. start_frame 0
  8. total_frames 119
  9. outfile plane
  10.  
  11. viewpoint {
  12.    from <0, 0, -100>
  13.    up    <0, 1, 0>
  14.    at    <0, 0, 0>
  15.    resolution 160, 100
  16.    aspect 1.6
  17.    angle 25
  18.    }
  19.  
  20. include "colors.inc"
  21.  
  22. background midnight_blue
  23. light < 100, 30, -200>
  24.  
  25. define rect
  26. object {
  27.    polygon 4, < 0.5, 0.01, -0.5>, < 0.5, 0.01,  0.5>,
  28.               <-0.5, 0.01,  0.5>, <-0.5, 0.01, -0.5>
  29.    }
  30.  
  31. define Missile
  32. object {
  33.      object { cylinder <0, 0, 0>, <11, 0, 0>, 1 }
  34.    + object { cone <11, 0, 0>, 1, <13, 0, 0>, 0 }
  35.    + object { polygon 3, <0,  1,  0>, <0,  3,  0>, < 2,  1,  0> }
  36.    + object { polygon 3, <0, -1,  0>, <0, -3,  0>, < 2, -1,  0> }
  37.    + object { polygon 3, <0,  0,  1>, <0,  0,  3>, < 2,  0,  1> }
  38.    + object { polygon 3, <0,  0, -1>, <0,  0, -3>, < 2,  0, -1> }
  39.    + object { polygon 3, <9,  1,  0>, <9,  3,  0>, <11,  1,  0> }
  40.    + object { polygon 3, <9, -1,  0>, <9, -3,  0>, <11, -1,  0> }
  41.    + object { polygon 3, <9,  0,  1>, <9,  0,  3>, <11,  0,  1> }
  42.    + object { polygon 3, <9,  0, -1>, <9,  0, -3>, <11,  0, -1> }
  43.    bounds object { cylinder <0, 0, 0>, <13, 0, 0>, 3 }
  44.    }
  45.  
  46. define left_wing
  47. object {
  48.      object { polygon 4, <10, 0, 0>, <30, 0,  0>, <18, 0, 20>, <10, 0, 20> }
  49.    + object { polygon 3, <30, 0, 0>, <27, 0,  5>, <58, 0, 0> }
  50.    }
  51.  
  52. define right_wing
  53. object {
  54.      object { polygon 4, <10, 0, 0>, <30, 0,  0>, <18, 0,-20>, <10, 0,-20> }
  55.    + object { polygon 3, <30, 0, 0>, <27, 0, -5>, <58, 0, 0> }
  56.    }
  57.  
  58. define left_stab
  59. object { polygon 4, <1, 0, 0>, <6, 0, 0>, <3, 0, 8>, <-2, 0, 8> }
  60.  
  61. define right_stab
  62. object { polygon 4, <1, 0, 0>, <6, 0, 0>, <3, 0,-8>, <-2, 0,-8> }
  63.  
  64. define engine
  65. object {
  66.      object { cylinder <0, 0, 0>, <30, 0, 0>, 2 }
  67.    + object { cone <25, 0, 0>, 0, <30, 0, 0>, 2 }
  68.    + object { cone <0, 0, 0>, 2, <-2, 0, 0>, 3 }
  69.    }
  70.  
  71. define fuselage
  72. object {
  73.      object { cylinder <0, 0, 0>, <80, 0, 0>, 3 }
  74.    + object { cone <80, 0, 0>, 3, <100, 0, 0>, 0 }
  75.    scale <1, 1.5, 1>
  76.    }
  77.  
  78. // Define the orientation of the aircraft
  79. if (frame < 60) {
  80.    define orient <-10, -6*frame-50, 0>
  81.    }
  82. else {
  83.    define orient <-10+6*(frame-60), -50, 0>
  84.    }
  85.  
  86. // Put together an aircraft
  87. object {
  88.      fuselage { shiny_red }
  89.    + engine { translate <0,-2, 3> shiny_yellow }
  90.    + engine { translate <0,-2,-3> shiny_yellow }
  91.    + left_wing  { translate <5, 1, 2> matte_blue }
  92.    + right_wing { translate <5, 1,-2> matte_blue }
  93.    + missile { translate <15, 1, 23> shiny_green }
  94.    + missile { translate <15, 1,-23> shiny_green }
  95.    + left_stab  { translate <0, 0, 3> matte_white }
  96.    + right_stab { translate <0, 0,-3> matte_white }
  97.    + left_stab  { rotate <-60, 0, 0> translate <0, 2, 2> matte_white }
  98.    + right_stab { rotate < 60, 0, 0> translate <0, 2,-2> matte_white }
  99.    translate <-50, 0, 0>
  100.    scale <0.6, 0.6, 0.6>
  101.    rotate orient
  102.    }
  103.